import Vue from "vue";
import VueRouter from "vue-router";
import Login from "@/view/Login";
import Signup from "@/view/Signup";
Vue.use(VueRouter);
const arrRouterList = [
	{
		path: "/login",
		component: Login,
		name: "login",
		meta: {
			title: "码云-登录"
		}
	},
	{
		path: "/signup",
		component: Signup,
		name: "signup",
		meta: {
			title: "码云-注册"
		}
	},
	{
		path: "*",
		redirect: "/login"
	}
];
let router = new VueRouter({
	mode: "hash",
	routes: arrRouterList
});
router.afterEach(route => {
	document.title = route.meta.title;
});
export default router;
